
#include "stdafx.h"
#include "WicMetadataBlockReader.h"

CWicMetadataBlockReader::CWicMetadataBlockReader()
{
    m_pIWICMetadataBlockReader = NULL;
}

CWicMetadataBlockReader::~CWicMetadataBlockReader()
{
    if(m_pIWICMetadataBlockReader)
    {
        m_pIWICMetadataBlockReader->Release();
    }
    m_pIWICMetadataBlockReader = NULL;
}

CWicMetadataBlockReader::CWicMetadataBlockReader(CWicMetadataBlockReader const & objMetadataBlockReader)
{
    m_pIWICMetadataBlockReader = objMetadataBlockReader.m_pIWICMetadataBlockReader;
    m_pIWICMetadataBlockReader->AddRef();
}

CWicMetadataBlockReader& CWicMetadataBlockReader::operator=(CWicMetadataBlockReader const & objMetadataBlockReader)
{
    if(m_pIWICMetadataBlockReader)
    {
        m_pIWICMetadataBlockReader->Release();
    }
    m_pIWICMetadataBlockReader = objMetadataBlockReader.m_pIWICMetadataBlockReader;
    m_pIWICMetadataBlockReader->AddRef();
    return *this;
}
